package com.winit.template.manager;

import com.winit.common.base.BaseController;
import com.winit.common.util.Constants;
import com.winit.common.util.JSONFileUtil;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by wangjian on 2017/9/28.
 */
@Component
public class TemplateManager extends BaseController {

    private static Logger logger = LoggerFactory.getLogger(TemplateManager.class);

    @Value("${template_list_file_path}")
    protected String template_list_file_path;

    public List<String> getTemplateList() {
        List<String> list = JSONFileUtil.getFileJsonForList(template_list_file_path, String.class);
        return list;
    }

}
